/**
 * 
 */
package events;

import wdmsim.Flow;
import wdmsim.Lightpath;
import wdmsim.Node;
import wdmsim.Path;
import wdmsim.Simulator;

/**
 * @author alissonslp
 *
 */
public class RouteRequestEvent extends Event {

	Flow flow;
	Path path;
	//int[] candidatesWavelengths;
	
	/**
	 * @param flow
	 */
	public RouteRequestEvent(Flow flow, Node generator) {
		this.flow = flow;
		this.id = eventCounter++;
		this.generator = generator;
	}
	
	public RouteRequestEvent(Flow flow, Node generator, int wavelengths) {
		this.flow = flow;
		this.id = eventCounter++;
		this.generator = generator;
		//this.candidatesWavelengths = wavelengths;
	}
	
	public RouteRequestEvent (CrankbackEvent crankbackEvent) {
		this.flow = crankbackEvent.getFlow();
		this.id = crankbackEvent.getId();
		this.generator = crankbackEvent.getGenerator();
		this.handler = crankbackEvent.getHandler();
	}

	public Flow getFlow() {
		return flow;
	}
	
	public void setFlow(Flow flow) {
		this.flow = flow;
	}
	
	/*public int[] getCandidatesWavelengths() {
		return candidatesWavelengths;
	}*/

	public String toString() {
		return Simulator.CURRENT_TIME + " " + getId() + " " + getFlow().getId() + " " + ((Node) getHandler()).getId() + " " + getFlow().getBw() + " " + getFlow().getSrc() + " " + getFlow().getDst() + " " + getFlow().getDuration() ;
	}
}
